<?php 
  
class Hoidap_Component_Block_Menusection extends Phpfox_Component 
{     
    public function process() 
    { 
		// $this->template()->setHeader('style.css', 'module_hoidap'); 
			
		// $this->template()->setHeader(array( 
        // 'reset.css' => 'module_hoidap', 
        // 'sample.js' => 'module_hoidap' 
			// ) 
		// ); 

		$category = Phpfox::getService('hoidap.category')->get('30'); 
		
		for($i=0; $i<count($category); $i++)
		{
			$idParentCat = $category[$i]['category_id'];
			$childCat = Phpfox::getService('hoidap.category')->getCatByParentCat($idParentCat);
				$category[$i]['childcat'] = $childCat;
		}

		
		$this->template()->assign('category', $category);  
	
        $this->template()->assign(array( 
                'sHeader' => 'Chủ đề câu hỏi', 
                'aFooter' => array('Xem tất cả' => $this->url()->makeUrl('hoidap.all')), 
            ) 
        ); 
         
        return 'block'; 

    } 
} 
  
?> 
